perm filename JJW.MF[MF,DEK] blob sn#750654 filedate 1984-04-12 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	delimiters ()
C00003 00003	def demochar(expr h,v)=
C00004 00004	%pausing:=1
C00005 ENDMK
CāŠ—;
delimiters ();
def tracingall=tracingcommands:=3;
 tracingedges:=1; tracingtitles:=1; tracingequations:=1; tracingspecs:=2;
	tracingpens:=1; tracingchoices:=1; tracingstats:=2;
 tracingonline:=1;tracingoutput:=1;tracingmacros:=3 enddef;
%tracingall;

vardef z@#=(x@#,y@#) enddef;

%h=10; v=10;
h=1; v=1;

edges e;
e=nulledges;

def draw expr x = addto e contour x withweight 1 enddef;
def erase expr x = addto e contour x withweight -1 enddef;

openwindow 1 from (0,0) to (400,450) at (-100,200);

hppp:=240/72.27;
vppp:=hppp;
charcode:=96;
def demochar(expr h,v)=
e:=nulledges;
def x=enddef; boolean x; def y=enddef; boolean y; % kludge to get around a bug...
numeric x[],y[],x[]a,y[]a;
charcode:=charcode+1;

z1=(6h,0);
z2=(0,8v);
z3=(4h,11v);
z4=(10h,8v);
z5=(17h,9v);
z6=(18h,2v);

z0=(9h,3v);

for n:=1 step 1 until 6:
 z[n]a-z0 = 2(z[n]-z0);
endfor

draw z1a..z2a..z3a..z4a..z5a..z6a..cycle;
erase z1..z2..z3..z4..z5..z6..cycle;

display e on 1;

charwd:=40h/hppp;
chardw:=40h;
shipout e;

showstats;
enddef;
%pausing:=1;
tracingedges:=1;
demochar(1,1);
tracingedges:=0;
demochar(2,1);
demochar(10,10);
demochar(10,-10);
end